<%--
  Created by IntelliJ IDEA.
  User: 杨鑫
  Date: 2021/3/26
  Time: 9:52
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>登录</title>
</head>
<body>
<%!
    String uname;
%>
<%
Cookie[] cookies= request.getCookies();
for(Cookie cookie:cookies){
if(cookie.getName().equals("uname")){
uname=cookie.getValue();
}

}%>
<form action="LoginServlet" method="post">
    用户名:<input type="text" name="uname" value="<%=(uname==null)?"":uname%>"><br>
    密码:<input type="password" name="upwd"><br>
    <input type="submit" value="登录">
    <input type="reset" value="重置">
</form>
</body>
</html>
